﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AesonBaseFramework.EntityFramework.BaseEntities;
using AesonBaseFramework.EntityFramework.Validation.Attribute;

namespace AesonBaseFramework.TestData
{
    public class Person : AesonBaseEntity
    {
        #region Private Fields

        private string _mail;
        private string _name;

        #endregion Private Fields

        #region Public Properties

        [Required]
        [IsEmail]
        public string Mail
        {
            get { return _mail; }
            set
            {
                if (value == _mail) return;
                _mail = value;
                OnPropertyChanged();
            }
        }

        [Required]
        [MaxLength(50)]
        public string Name
        {
            get { return _name; }
            set
            {
                if (value == _name) return;
                _name = value;
                OnPropertyChanged();
            }
        }

        #endregion Public Properties
    }
}
